Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved Status Reports #69

Merged
merged 1 commit into from
Oct 30, 2019
Merged

Improved Status Reports #69

merged 1 commit into from
Oct 30, 2019

Conversation

WhoSoup
Copy link
Contributor

@WhoSoup WhoSoup commented Oct 30, 2019

closes: #46

Per #46, we really need better reporting. This PR does the following:

  • If the node is up to date on boot, it will print: level=info msg="Node is up to date" height=XXXXXX
  • If it's the intial sync, or there are > 1 blocks to sync, it will print a message before and after the sync loop:
    level=info msg="Starting sync job of XXX blocks" height=AAAAAA target=BBBBBBB
    and
    level=info msg="Finished sync job" blocks-synced=XXX height=BBBBBBB
  • Instead of reporting sync stats every 50 blocks, it will report them every 15 seconds
  • Under normal operations (not syncing more than one block at a time), print out a "status report" with current height every 6 blocks (height%6 == 0), which should be roughly once an hour

edit: fixed link to right issue

@WhoSoup
Copy link
Contributor Author

WhoSoup commented Oct 30, 2019

Example outputs

time="2019-10-30T12:17:58+01:00" level=info msg="Listening on :8070..."
time="2019-10-30T12:17:58+01:00" level=info msg="Starting sync job of 291 blocks" height=216273 target=216564
time="2019-10-30T12:18:13+01:00" level=info msg="sync stats" avg=188.773297ms elapsed=15.1018638s height=216353 left=39.831165667s syncing-to=216564
time="2019-10-30T12:18:28+01:00" level=info msg="sync stats" avg=186.041504ms elapsed=30.1397239s height=216435 left=23.999354016s syncing-to=216564
time="2019-10-30T12:18:43+01:00" level=info msg="sync stats" avg=184.120286ms elapsed=45.2955908s height=216519 left=8.28541287s syncing-to=216564
time="2019-10-30T12:18:52+01:00" level=info msg="Finished sync job" blocks-synced=291 height=216564

and

time="2019-10-30T12:30:07+01:00" level=info msg="Listening on :8070..."
time="2019-10-30T12:30:07+01:00" level=info msg="Node is up to date" height=216565
time="2019-10-30T13:14:58+01:00" level=info msg="status report" height=216570
time="2019-10-30T14:14:59+01:00" level=info msg="status report" height=216576

@Emyrk Emyrk merged commit ed0f65a into develop Oct 30, 2019
@Emyrk Emyrk deleted the status_report branch December 3, 2019 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants